<template>
<div>
  这是配置路由传参
<el-button @click="query">跳转query方式</el-button>
  <el-button @click="params">跳转params方式</el-button>
  <el-button @click="directive">跳转自定义权限指令</el-button>
  <router-view/>
</div>
</template>

<script>
export default {
  name: "test",
  methods:{
    query(){
      this.$router.push(`/query?math=${Math.random().toFixed(2)}`)
    },
    params(){
      this.$router.push({
        name:'params',
        params:{
          a:Math.random().toFixed(2),
          b:Math.random().toFixed(2)
        }
      })
    },
    directive(){
      this.$router.push(`/directive`)
    }
  }
}
</script>

<style scoped>

</style>
